package com.ruoyi.psi.purchase.order.service;


import com.ruoyi.psi.purchase.apply.domain.PurchaseApplyList;
import com.ruoyi.psi.purchase.order.domain.PurchaseOrder;
import com.ruoyi.psi.purchase.order.domain.PurchaseOrderList;

import java.util.List;

/**
 * 采购订单
 * 业务层
 * @author Drj 2021/6/28
 */
public interface IPurchaseOrderService {
    /**
     * 采购订单查询
     * @param purchaseOrder
     * @return
     */
    public List<PurchaseOrder> selectPurchaseOrderList(PurchaseOrder purchaseOrder);

    /**
     * 按编号查询
     * @param purchaseOrderId 采购订单编号
     * @return
     */
    public PurchaseOrder selectPurchaseOrderById(String purchaseOrderId);

    /**
     * 采购订单新增
     * @param purchaseOrder
     * @return
     */
    public int insertPurchaseOrder(PurchaseOrder purchaseOrder) throws Exception;

    /**
     * 根据申请单详情采购订单新增
     * 采购跟单
     * @param purchaseOrder
     * @return
     * @throws Exception
     */
    public int insertPurchaseOrderByPurchaseApplyList(PurchaseOrder purchaseOrder) throws Exception;
    /**
     * 采购订单更新
     * @param purchaseOrder
     * @return
     */
    public int updatePurchaseOrder(PurchaseOrder purchaseOrder) throws Exception;

    /**
     * 更新采购订单删除标志位
     * @param purchaseOrder
     * @return
     */
    public int updatePurchaseOrderDeleteFlag(PurchaseOrder purchaseOrder);

    /**
     * 采购订单详细查询
     * @param purchaseOrderList
     * @return
     */
    public List<PurchaseOrderList> selectPurchaseOrderListList(PurchaseOrderList purchaseOrderList);

    /**
     * 查询采购订单对应的所有产品详细
     * @param purchaseOrderId 采购订单编号
     * @return
     */
    public List<PurchaseOrderList> selectPurchaseOrderListListById(String purchaseOrderId);

    /**
     * 查询采购订单对应的指定产品详细
     * @param purchaseOrderId
     * @return
     */
    public PurchaseOrderList  selectPurchaseOrderListById(String purchaseOrderId, String produceId);

    /**
     * 查询所有未入库的采购订单
     * @param purchaseOrder
     * @return
     */
    List<PurchaseOrder> selectAllNotStoragePurchaseOrderList(PurchaseOrder purchaseOrder);

    /**
     * 查询某未入库采购订单的详情信息
     * @param purchaseOrderId
     * @return
     */
    List<PurchaseOrderList> selectNotStoragePurchaseOrderById(String purchaseOrderId);

    /**
     * 查询某未质检的采购订单的详情信息
     * @param purchaseOrderId
     * @return
     */
    List<PurchaseOrderList> selectNotInspectPurchaseOrderById(String purchaseOrderId);
}
